<?php
/* @var $this PageController */
/* @var $model Page */
/* @var $form CActiveForm */
?>

<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'page-form',
	// Please note: When you enable ajax validation, make sure the corresponding
	// controller action is handling ajax validation correctly.
	// There is a call to performAjaxValidation() commented in generated controller code.
	// See class documentation of CActiveForm for details on this.
	'enableAjaxValidation'=>false,
)); ?>

	<p class="note">Fields with <span class="required">*</span> are required.</p>

	<?php echo $form->errorSummary($model); ?>
<div class="row  right buttons">
		<?php echo CHtml::submitButton($model->isNewRecord ? 'Create Page' : 'Save Page'); ?>
	</div>
        
        <div class="clearfix"></div>
        <hr>
        <div class="row">
		<?php echo $form->labelEx($model,'title'); ?>
		<?php echo $form->textField($model,'title',array('size'=>60,'maxlength'=>100)); ?>
		<?php echo $form->error($model,'title'); ?>
	</div>

        <div class="row">
            <?php echo $form->labelEx($model,'published'); ?>
            <?php echo $form->dropDownList($model,'published',array(0=>'Un Published',1=>'Published')); ?>
        </div>
        
	<div class="row">
		<?php echo $form->labelEx($model,'content'); ?>
		<?php 
                
                $this->widget('ext.tinymce.TinyMce', array(
    'model' => $model,
    'attribute' => 'content',
    // Optional config
    //'compressorRoute' => 'tinyMce/compressor',
    //'spellcheckerUrl' => array('tinyMce/spellchecker'),
    // or use yandex spell: http://api.yandex.ru/speller/doc/dg/tasks/how-to-spellcheck-tinymce.xml
    //'spellcheckerUrl' => 'http://speller.yandex.net/services/tinyspell',
    //'fileManager' => array(
    //    'class' => 'ext.elFinder.TinyMceElFinder',
    //    'connectorRoute'=>'admin/elfinder/connector',
   // ),
    'htmlOptions' => array(
        'rows' => 25,
        'cols' => 60,
    ),
));
                
                
//                echo $form->textArea($model,'content',array('rows'=>6, 'cols'=>50)); 
                ?>
		<?php echo $form->error($model,'content'); ?>
	</div>

	
	<div class="row">
		<?php echo $form->labelEx($model,'meta_keyword'); ?>
		<?php echo $form->textField($model,'meta_keyword',array('size'=>60,'maxlength'=>200)); ?>
		<?php echo $form->error($model,'meta_keyword'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'meta_description'); ?>
		<?php echo $form->textArea($model,'meta_description',array('rows'=>6, 'cols'=>50)); ?>
		<?php echo $form->error($model,'meta_description'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'slug'); ?> [URL]
		www.businessjot.com<?php echo DIRECTORY_SEPARATOR;
               // echo implode(DIRECTORY_SEPARATOR, Tree::getPath($model->id));
                echo $form->textField($model,'slug',array('size'=>60,'maxlength'=>200)); ?>
		<?php echo $form->error($model,'slug'); ?>
	</div>
        <hr>
	<div class="row right buttons ">
		<?php echo CHtml::submitButton($model->isNewRecord ? 'Create Page' : 'Save Page'); ?>
	</div>
<div class="clearfix"></div>
<?php $this->endWidget(); ?>

</div><!-- form -->